/*
 * Copyright (c) 2006 Your Corporation. All Rights Reserved.
 */
package org.ivytools.repository.svn;

import org.tigris.subversion.svnclientadapter.ISVNDirEntry;
import org.tigris.subversion.svnclientadapter.SVNRevision;
import org.tigris.subversion.svnclientadapter.SVNNodeKind;

import java.util.Date;

/**
 * Unfortunately, there doesn't seem to be a way with svnClientAdapter to
 * get the DirEntry for the root directory. So use this as a placeholder in
 * those circumstances.
 */
public class RootDirEntry implements ISVNDirEntry {
    private Date now = new Date();

    public String getPath() {
        return "";
    }

    public Date getLastChangedDate() {
        return now;
    }

    public SVNRevision.Number getLastChangedRevision() {
        return null;
    }

    public boolean getHasProps() {
        return true;
    }

    public String getLastCommitAuthor() {
        return null;
    }

    public SVNNodeKind getNodeKind() {
        return SVNNodeKind.DIR;
    }

    public long getSize() {
        return 0;
    }
}
